#include "pch.h"
#include "game.h"

Game::Game() {
    call_ = std::make_shared<Call>();
    data_ = std::make_shared<Data>(call_);
}

void Game::init(HWND hwnd_game, uint64 module_base) {
    call_->init(hwnd_game, module_base);
    data_->init(module_base);
}

std::shared_ptr<Data> Game::data() {
    // data_->updating();
    return data_;
}

std::shared_ptr<Call> Game::call() {
    return call_;
}

void Game::key_down(uint8 keycode) {
    WAIT_STOP_RETURN(1);
    call()->key_down(keycode);
}

void Game::key_up(uint8 keycode) {
    WAIT_STOP_RETURN(1);
    call()->key_up(keycode);
}